import 'package:flutter/material.dart';

///Text控件,7个不同的样式
void main() {
  runApp(MaterialApp(
    title: 'Flutter教程03-2',
    home: TextDemo(),
  ));
}

class TextDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('文本控件'),
      ),
      body: Column(
        children: <Widget>[
          Text(
            '红色+黑色删除线+25号',
            style: TextStyle(
                color: const Color(0xffff0000),
                decoration: TextDecoration.lineThrough,
                decorationColor: const Color(0xff000000),
                fontSize: 25.0),
          ),
          Text(
            '橙色+下划线+24号',
            style: TextStyle(
                color: const Color(0xffff9900),
                decoration: TextDecoration.underline,
                fontSize: 24.0),
          ),
          Text(
            '虚线上划线+23号+倾斜',
            style: TextStyle(
                decoration: TextDecoration.overline,
                decorationStyle: TextDecorationStyle.dashed,
                fontSize: 23.0,
                fontStyle: FontStyle.italic),
          ),
          Text(
            'serif字体+24号',
            style: TextStyle(
              fontFamily: 'serif',
              fontSize: 24.0
            ),
          ),
          Text(
            'monospace字体+24号+加粗',
            style: TextStyle(
              fontFamily: 'monospace',
              fontSize: 24.0,
              fontWeight: FontWeight.bold
            ),
          ),
          Text(
            '天蓝色+25号+2行跨度',
            style: TextStyle(
              color: const Color(0xff4a86e8),
              fontSize: 25.0,
              height: 2.0
            ),
          ),
          Text(
            '24号+2个字母的间隔aAsdfsbfdsfaas',
            style: TextStyle(
                fontSize: 24.0,
                letterSpacing: 2.0
            ),
          ),
        ],
      ),
    );
  }
}
